<?php
require("page_start.php");
print("<p><p>\n");

exec('date', $data);
exec('util/help uptime', $uptime);
exec('hostname', $hostname);
exec('uname -s', $system);
exec('uname -r', $version);
exec('uname -m', $arch);
exec('util/help memtotal', $totalmem);
exec('util/help cpu', $cpu);
//exec('util/help cpu-mhz', $cpuMHz);
exec('util/help cpu-cache', $cpucache);

$cellcolor = 'style="background-color: rgb(192, 201, 157)";';


print("<center>\n\t<table>\n");
print("\t\t<tr><td $cellcolor>Hostname:</td><td $cellcolor>" . $hostname[0] . "</td></tr>\n");
print("\t\t<tr><td $cellcolor>CPU:</td><td $cellcolor>" . $cpu[0] . "</td></tr>\n");
//print("\t\t<tr><td $cellcolor>CPU MHz:</td><td $cellcolor>" . $cpuMHz[0] . "</td></tr>\n");
print("\t\t<tr><td $cellcolor>CPU cache:</td><td $cellcolor>" . $cpucache[0] . "</td></tr>\n");
print("\t\t<tr><td $cellcolor>RAM:</td><td $cellcolor>" . $totalmem[0] . "</td></tr>\n");
print("\t\t<tr><td $cellcolor>Sistema:</td><td $cellcolor>" . $system[0] . "-" . $version[0] . "</td></tr>\n");
print("\t\t<tr><td $cellcolor>Arch:</td><td $cellcolor>" . $arch[0] . "</td></tr>\n");
print("\t\t<tr><td $cellcolor>Data:</td><td $cellcolor>" . $data[0] . "</td></tr>\n");
print("\t\t<tr><td $cellcolor>Uptime:</td><td $cellcolor>" . $uptime[0] . "</td></tr>\n");
print("\t</table>\n</center>");

print("<p><p><center><b>" . $cpu[0] . "</b><br>\n<a href=\"mrtg/cpu.html\"><img src=\"mrtg/cpu-day.png\"></a></center>");
print("<p><p><center><b>Mem&oacute;ria RAM</b><br>\n<a href=\"mrtg/ram.html\"><img src=\"mrtg/ram-day.png\"></a></center>");



print("      
   </td>
   <tr></tr><td border=\"0\" align=\"absmiddle\" bgcolor=\"#a6ae88\"><a href=\"http://www.nosoftwarepatents.com\"><img src=\"IMG/nosoftwarepatents.gif\" width=\"80\" height=\"15\" border=\"0\" alt=\"NO SOFTWARE PATENTS !!\"></a>\n
	<a href=\"http://www.php.net\"><img src=\"IMG/php-power.gif\" width=\"80\" height=\"15\" border=\"0\" alt=\"PHP Powered\">\n
   <a href=\"http://oss.oetiker.ch/mrtg/\"><img src=\"IMG/mrtg.gif\" width=\"80\" height=\"15\" border=\"0\" alt=\"MRTG Graphics\"></a></td>\n
   </tr>
</table>
</center>
</body>
</html>
");
?>